const express=require('express')
const router=express.Router()

//用户路由处理函数对应的中间件
const handler=require('../router_handler/med_pur')
//导入验证数据中间件
const expressJoi=require('@escook/express-joi')
const {pursup_find_schema,pur_schema,pur_update_schema,delete_schema}=require('../schema/medicine')

router.post('/findall',handler.purall)
router.post('/insert',expressJoi(pur_schema),handler.purinsert)
router.post('/delete',expressJoi(delete_schema),handler.purdeleteid)
router.post('/update',expressJoi(pur_update_schema),handler.purupdate)
router.post('/find',expressJoi(pursup_find_schema),handler.purfind)
module.exports=router